home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1988 April
/
Ahoy_Magazine_88-04_1988_Double_L.d64
/
Sing A String
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
736b
|
20 lines
10 rem play command for c-64
20 rem set up music note array
30 dim h(107),l(107):s=54272
40 print"wait...creating note array"
50 forx=.to62:m=2703*(2^((x-20)/12)):ifm>65535thenm=65535
60 h(x)=int(m/256):l(x)=m-h(x)*256:next
70 print"perils and danger...."
80 m$="a6c6g6a6c6g6a4c4g4c8g8d8e6c6g6d6e6":gosub140
90 print"the light of a new day...."
100 m$="q2s2l3l2q2s3l1m1n1o2s2q1r2p2y6":gosub140
110 end
120 rem sid stringsinger subroutine
130 rem notes and durations in m$
140 forx=.to24:pokes+x,.:next:pokes+5,4:pokes+12,4:pokes+19,4:pokes+6,241:pokes+13,241
150 pokes+20,241:pokes+4,33:pokes+11,33:pokes+19,33:pokes+24,15
160 forn=1tolen(m$)step2:m=asc(mid$(m$,n,1))-33:d=val(mid$(m$,n+1,1))
170 pokes+1,h(m):pokes,l(m):pokes+8,h(m+3):pokes+7,l(m+3)
180 pokes+15,h(m+12):pokes+14,l(m+12):forx=.tod*100:next:next
190 forn=15to.step-1:pokes+24,n:forx=.to50:next:next:return